package com.freedom.auth.vo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * @author freedom
 */
@Data
public class ClueImportVo implements Serializable, IExcelModel, IExcelDataModel {

    @Excel(name = "标识")
    private Long id;

    @NotBlank
    @NotEmpty(message = "全称不能为空")
    @Excel(name = "全称")
    private String name;

    @Excel(name = "称呼")
    private String nickname;

    @Excel(name = "公司")
    private String company;

    @Excel(name = "职业")
    private String career;

    @Email(message = "请填写正确的邮箱地址")
    @Excel(name = "邮箱")
    private String email;

    @Excel(name = "手机")
    private String phone;

    @Length(min = 1, max = 11, message = "请填写正确的手机号")
    @Excel(name = "移动电话")
    private String mobilephone;

    @Excel(name = "地址")
    private String address;

    @Excel(name = "描述")
    private String desc;

    private Integer rowNum;

    private String errorMsg;


    @Override
    public Integer getRowNum () {
        return this.rowNum;
    }

    @Override
    public void setRowNum ( Integer integer ) {
        this.rowNum = integer;
    }

    @Override
    public String getErrorMsg () {
        return this.errorMsg;
    }

    @Override
    public void setErrorMsg ( String s ) {
        this.errorMsg = s;
    }
}
